<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改评价')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-evaluate-edit" th:object="${evaluate}">
            <input id="id" name="id" th:field="*{id}"  type="hidden">
            <h4 class="form-header h4">基本信息</h4>
            
            <div class="form-group">	
				<label class="col-sm-2 control-label">订单编号：</label>
				<div class="col-sm-3">
					<input id="orderId" name="orderId" th:field="*{orderId}" class="form-control" type="text">
				</div>
				
				<label class="col-sm-2 control-label">评价类型：</label>
				<div class="col-sm-3">				
					<select id="type" name="type" class="form-control m-b"
						th:field="*{type}">
						<option value=""></option>
						<option value="6001">首次评价</option>
						<option value="6002">追评</option>						
					</select>				
				</div>
			</div>
			
			<div class="form-group">	
				<label class="col-sm-2 control-label">用户id：</label>
				<div class="col-sm-3">
					<input id="userId" name="userId" th:field="*{userId}" class="form-control" type="text">
				</div>
			
				<label class="col-sm-2 control-label">骑手id：</label>
				<div class="col-sm-3">
					<input id="qishouId" name="qishouId" th:field="*{qishouId}" class="form-control" type="text">
				</div>
			</div>
			
			<h4 class="form-header h4">评价信息</h4>
			<div class="form-group">	
				<label class="col-sm-2 control-label">评价图片：</label>
				<div class="col-sm-8">
					<input id="tp" name="tp" th:field="*{tp}" class="form-control" type="hidden">
					<img id="evaluateSrc" width="200px" height="200px">
				</div>
			</div>
			
			<div class="form-group">	
				<label class="col-sm-2 control-label">评价内容：</label>
				<div class="col-sm-8">
					<textarea id="content" name="content" th:field="*{content}" class="form-control" ></textarea>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-2 control-label">评价时间：</label>
				<div class="col-sm-3">
					<input id="creactDate" name="creactDate" th:field="*{creactDate}" class="form-control" type="text">
				</div>
			
				<label class="col-sm-2 control-label">评价用户：</label>
				<div class="col-sm-3">
					<input id="createBy" name="createBy" th:field="*{createBy}" class="form-control" type="text">
				</div>
			</div>
			
			
		
			
			
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "Evaluate/evaluate";
		$("#form-evaluate-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-evaluate-edit').serialize());
	        }
	    }
		
		
		var img = document.getElementById('evaluateSrc');
		var fileinput = document.getElementById('tp').value;
		if (fileinput != '') {
			img.src = fileinput;
		}
	</script>
</body>
</html>
